﻿using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WindowsFormsApp2.Util
{
    class RegUtil
    {
        const string reg_key= @"software\emz\iden_card";
        public void WriteString(string keyName,string valuex)
        {
            string ret = "";


            using(var reg = Registry.CurrentUser.CreateSubKey(reg_key, true))
            {
                reg.SetValue(keyName, valuex);
            }
        }

        public string ReadString(string keyName)
        {
            string ret = "";


            using (var reg = Registry.CurrentUser.CreateSubKey(reg_key, true))
            {
                ret = reg.GetValue(keyName).ToString();
            }

            return ret;
        }

        
    }
}
